﻿using System;
using DC2010.Effects;
using DC2010.Objects.Base;
using DC2010.AI;

namespace DC2010.Objects.Data
{
    [Serializable]
    public class AIData : BaseData
    {
	
        public AIGfx Gfx
        {
            get
            {
                if (!string.IsNullOrEmpty(GfxId))
                {
                    return Root.I.AISystem.GetGfx(GfxId);
                }

                return null;
            }
        }	
		
        private AILogic _l;
        public AILogic L
        {
            get
            {
                if (_l == null)
                    _l = Root.I.AISystem.InstantiateAI(this);

                return _l;
            }
        }
    }
}
